From: Marco Trevisan (TreviƱo) Date: Fri, 17 Apr 2020 15:51:27 +0000 (+0200) Subject: polkitAgent: Return GLib.SOURCE_REMOVE on timeout callback X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~487 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bfa34914db7867fbdb8f85c7136c7e7e8dff5ce9;p=gnome-shell.git polkitAgent: Return GLib.SOURCE_REMOVE on timeout callback resetDialog is used (also) as GLib timeout function, so while just returning an undefined value will stop the timeout anyways, it's just cleaner to use the GSource expected return values https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1203 --- diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 4bfbde1bb..d77f797c0 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -328,11 +328,13 @@ var AuthenticationDialog = GObject.registerClass({ let resetDialog = () => { if (this.state != ModalDialog.State.OPENED) - return; + return GLib.SOURCE_REMOVE; this._passwordEntry.hide(); this._cancelButton.grab_key_focus(); this._okButton.reactive = false; + + return GLib.SOURCE_REMOVE; }; if (delay) {